package com.itgaoshu.service.impl;

import com.itgaoshu.bean.*;
import com.itgaoshu.mapper.DrugstoreMapper;
import com.itgaoshu.service.DrugStoreService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * \* @author: 李豪杰
 * \* Date: 2021/3/22
 * \* Time: 10:26
 * \* Description:
 * \
 */
@Service
@Transactional
public class DrugStoreServiceImpl implements DrugStoreService {
    @Resource
    private DrugstoreMapper drugstoreMapper;
    @Override
    public int addDrugs(Drugstore drugstore) {//新增入库药品

        return drugstoreMapper.addDrugs(drugstore);
    }
    @Override
    //查询库房药品信息
    public List<Drugstore> selStore(Drugstore drugstore) {

        return drugstoreMapper.selStore(drugstore);
    }
    @Override
    public List<Type> seltype(Type type) {
        return drugstoreMapper.seltype(type);
    }

    @Override
    public List<Area> selarea(Area area) {
        return drugstoreMapper.selarea(area);
    }

    @Override
    public List<Unit> selunit(Unit unit) {
        return drugstoreMapper.selunit(unit);
    }

    @Override
    public List<Skull> selskull(Skull skull) {
        return drugstoreMapper.selskull(skull);
    }

    @Override
    public List<Upplier> selupplier(Upplier upplier) {
        return drugstoreMapper.selupplier(upplier);
    }

    @Override
    public int updrugstore(Drugstore drugstore) {

        return drugstoreMapper.updrugstore(drugstore);
    }
    @Override
    public List<Warehuose> selwarehuose(Warehuose warehuose) {
        return drugstoreMapper.selwarehuose(warehuose);
    }
    @Override//查询过期的药品
    public List<Drugstore> seldrugDate(Drugstore drugstore) {
        return drugstoreMapper.seldrugDate(drugstore);
    }

    @Override//删除过期的药品
    public int delguoqidurg(Integer rugstoreId) {
        return drugstoreMapper.delguoqidurg(rugstoreId);
    }
    @Override//查询库存不足的药品
    public List<Drugstore> selectlackdrug(Drugstore drugstore) {
        return drugstoreMapper.selectlackdrug(drugstore);
    }
    @Override//删除采购单
    public int delcaigou(Integer caigouid) {
        return drugstoreMapper.delcaigou(caigouid);
    }
    //采购相关的增查改
    @Override
    public int addcaigou(Caigou caigou) {
        return drugstoreMapper.addcaigou(caigou);
    }

    @Override
    public int selcaigouname(Caigou caigou) {
        return drugstoreMapper.selcaigouname(caigou);
    }

    @Override
    public int upcaigounumber(Caigou caigou) {
        return drugstoreMapper.upcaigounumber(caigou);
    }

    @Override
    public List<Caigou> selcaigou(Caigou caigou) {
        return drugstoreMapper.selcaigou(caigou);
    }
}
